<?php if(!defined('A')) exit;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站内容管理系统</title>
<?php
loadcss(array('reset','shell'));

loadcss(array('colorbox'),P_CSS);
loadjs(array('jquery','jquery.colorbox'),P_JS);

loadjs(array('tab','util','table'));
?>
<script type="text/javascript">
$(document).ready(function(e) {
var smallNowTab;
var pt = new Tabs();
pt.classpre="smalltab_";
pt.container = "smalltab_container";
pt.createTab("t1","静态生成","",true,"n");
pt.init = function(){
	smallNowTab = pt.nowTab;
};
pt.onclick = function(){
	smallNowTab = pt.nowTab;
};		
pt.initTab();
pt.clickNowTab();    
});

//$(document).ready(function(){ 
//	$(".example1").colorbox({width:"400px", height:"400px", iframe:true, opacity:0.3});
//});
$(document).ready(function(){ 
	
	$('#html_all').click(function(){
		$('#myform').attr('action','<?php echo url('arc','html_','k=all');?>');
	});
	
	$('#html_index').click(function(){
		$('#myform').attr('action','<?php echo url('arc','html_','k=index');?>');
	});
	
	$('#html_list').click(function(){
		$('#myform').attr('action','<?php echo url('arc','html_','k=list');?>');
	});
	
	$('#html_show').click(function(){
		$('#myform').attr('action','<?php echo url('arc','html_','k=show');?>');
	});
	
	$('#html_update').click(function(){
		$('#myform').attr('action','<?php echo url('arc','html_','k=update');?>');
	});
	//////////
	$('#html_show2').click(function(){
		$('#myform2').attr('action','<?php echo url('arc','html_','k=show');?>');
	});
	
	$('#html_update2').click(function(){
		$('#myform2').attr('action','<?php echo url('arc','html_','k=update');?>');
	});
	//////////
	$('#html_cate').click(function(){
		$('#myform3').attr('action','<?php echo url('arc','html_','k=cate');?>');
	});
	
	$('#html_item').click(function(){
		$('#myform3').attr('action','<?php echo url('arc','html_','k=item');?>');
	});

	
});
</script>
<style>
body{margin:10px;}
</style>
</head>
<body>
<table class="settop">
<tr>
<td class="settop_left">
&nbsp;&nbsp;
</td>
<td>
<div id="smalltab_container"></div>
</td>
</tr>
</table>
<div class="smalltab_line"></div>
<div id="t1">
<br />
<br />

<table width="100%" border="1" cellspacing="0" cellpadding="0" class="mytable">
<form action="" method="post" id="myform">
  <tr>
    <td colspan="4" align="center">
    <input type="submit" id="html_all" class="color_btn color_btn_red" value="一键生成" />&nbsp;
    <input type="submit" id="html_index" class="color_btn color_btn_purple" value="生成首页" />&nbsp;
    <input type="submit" id="html_list" class="color_btn color_btn_purple" value="生成列表" />&nbsp;
    <input type="submit" id="html_show" class="color_btn color_btn_purple" value="生成内容" />&nbsp;
    <input type="submit" id="html_update" class="color_btn color_btn_green" value="更新信息" />&nbsp;
    </td>
    </tr>
</form>
<form action="" method="post" id="myform2">
  <tr>
    <td colspan="4" align="left"><strong>生成内容</strong></td>
    </tr>
  <tr>
    <td align="center">起始ID（fid）</td>
    <td align="center">结束ID(tid)</td>
    <td align="center">每轮生成数量(num)</td>
    <td align="center">操作</td>
  </tr>
  <tr>
    <td align="center"><input type="text" name="fid" value="<?php echo $fid;?>" class="input2"></td>
    <td align="center"><input type="text" name="tid" value="<?php echo $tid;?>" class="input2"></td>
    <td align="center"><input type="text" name="num" value="<?php echo $num;?>" class="input2"></td>
    <td align="center"><input type="submit" id="html_show2" class="color_btn color_btn_blue" value="生成内容" /><input type="submit" id="html_update2" class="color_btn color_btn_blue" value="更新信息" /></td>
  </tr>
</form>
<form action="" method="post" id="myform3">
  <tr>
    <td colspan="4" align="left"><strong>分段生成</strong></td>
    </tr>
  <tr>
    <td colspan="2" align="center">选择分类</td>
    <td align="center">每轮生成数量</td>
    <td align="center">操作</td>
  </tr>
  <tr>
    <td colspan="2" align="center">
    	<select name="catid" id="">
            <option value="">--选择分类--</option>
            <?php foreach ($category_arr as $key => $value) { ?>
            <option value="<?php echo $value['id'] ?>" <?php if($value['type']==1) echo 'disabled="disabled"';?>><?php echo str_repeat('&nbsp;',substr_count($value['path'], ',')*4)?>┖─&nbsp;<?php echo $value['name'] ?></option>
            <?php } ?>
        </select>
    第 <input type="text" class="input2" name="fpage" value="1"/> 页 至 <input type="text" class="input2" name="tpage" value=""/> 页
    </td>
    <td align="center"><input type="text" name="num" value="<?php echo $num;?>" class="input2"></td>
    <td align="center"><input type="submit" id="html_cate" class="color_btn color_btn_blue" value="生成列表" /><input type="submit" id="html_item" class="color_btn color_btn_blue" value="生成内容" /></td>
  </tr>
</form>
</table>
<br />
</div>
</body>
</html>